html.dark {
  blockquote {
    background: var(--shizuku-background-color);
    border-left: 5px solid var(--shizuku-theme-color);
  }

  article {
    color: var(--shizuku-text-color);
  }

  .is-note .note-article::after {
    background-image: linear-gradient(-45deg, transparent 50%, #333 0);
    border-left: 1px solid #555;
    border-top: 1px solid #555;
  }

  :not(pre) > code {
    background-color: #3c3a3b;
    color: var(--shizuku-theme-color);
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 1rem;
}

.avatar-wrap {
  position: relative;
  z-index: 0;
}

.avatar-shadow {
  position: absolute;
  border-radius: 100%;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  background: var(--bg) no-repeat center/cover;
  display: inline-block;

  &::after {
    position: absolute;
    left: 0;
    top: 10%;
    z-index: -1;
    border-radius: 100%;
    width: 100%;
    height: 100%;
    background: inherit;
    filter: blur(10px) brightness(80%) opacity(0.8);
    content: '';
    transform: scale(0.95);
  }
}

input[type*='date'],
input[type='email'],
input[type='month'],
input[type='number'],
input[type='password'],
input[type='search'],
input[type='tel'],
input[type='text'],
input[type='time'],
input[type='url'],
input[type='week'],
select,
textarea {
  min-height: unset;
}

a {
  cursor: pointer;
}

@media (max-width: 600px) {
  .head-menu a {
    display: inline-block;
  }
}

img,
svg,
audio,
video,
iframe {
  vertical-align: unset;
}

pre,
code {
  font-family: var(--mono-font) !important;
}

pre,
pre > code {
  color: inherit !important;
  text-shadow: none !important;
  transition: color 0.5s;

  * {
    background: var(--light-bg);
  }

  .linenumber {
    position: sticky;
    left: 0;
  }
}

.paragraph {
  margin: 0.5rem 0;
  line-height: 1.8;
}

.is-note .note-article {
  background-color: var(--light-bg);
  margin: -30px -45px;
  padding: 30px 45px;
  border-radius: 0 6px 6px 0;
  box-shadow: 3px 5px 6px -5px rgb(51 51 51 / 20%),
    2px 3px 8px -5px rgb(51 51 51 / 20%);

  #write {
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      margin-left: 1.5em;
    }
  }

  .kami-toc {
    right: -5em;
  }

  @media (min-width: 599px) {
    border: 1px solid rgb(187 187 187 / 20%);

    &::before,
    &::after {
      position: absolute;
      width: 3em;
      height: 3em;
      right: 0;
      bottom: 0;
      content: '';
    }

    &::before {
      height: 58.8px;
      transform: rotate(45deg) translateX(27px) translateY(6px);
      border-left: 1px solid #ccc;
      z-index: 1;
    }

    &::after {
      background-image: linear-gradient(
        -45deg,
        transparent 50%,
        rgb(153 151 151 / 12.3%) 0
      );
      border-left: 1px solid #ccc;
      border-top: 1px solid #ccc;
      border-top-left-radius: 8px;
      transition: border 0.2s, background 0.2s;
    }
  }

  @media (max-width: 599px) {
    & {
      margin: 0;
      padding: 10px 0;
      background-color: initial;
      box-shadow: unset;
    }

    &::before {
      content: '';
      position: absolute;
      top: -3em;
      bottom: -10px;
      right: -1.25em;
      left: -1.25em;
      background-color: var(--light-bg);
      z-index: -1;
    }
  }
}

.is-note #write {
  font-family: var(--serif-font);
  color: var(--shizuku-text-color);
  font-size: 16px;
  line-height: 1.75;
  word-wrap: break-word;
  padding-top: 2rem;

  > p:first-child {
    margin-bottom: 2rem;
  }
}

.is-note strong {
  font-family: var(--sans-font);
}

.is-note .note-head {
  width: 100%;
  text-align: center;
}

.is-note .note-head h1 {
  font-size: 32px;
}

.is-note .note-meta {
  margin: 1rem;
  text-align: center;
  line-height: 16px;
  font-size: 16px;
  opacity: 0.8;
  font-family: var(--sans-font);
}

.is-note .note-meta > div {
  display: inline-block;
}

.is-note .note-meta span {
  margin: 0 6px;
  display: inline-block;
}

.is-note #write > .paragraph:first-child::first-letter {
  float: left;
  font-size: 2.4em;
  margin: 0 0.2em 0 0;
}

.is-note #write > .paragraph {
  clear: both;
}

.is-note #write > ul .indent,
.is-note #write > .paragraph .indent {
  border-bottom: 1px solid #00b8bb41;
}

.is-note #write > .paragraph:not(:nth-child(1)) > span.indent {
  &:nth-child(1) {
    margin-left: 2rem;
  }
}

.is-note .btn:not(:last-child) {
  margin-right: 12px;
}

.is-note blockquote:not(:first-child) {
  margin-left: calc(-3em + 2px);
  margin-right: calc(-3em + 2px);
  border: none;
  padding: 1em 5em;

  @media screen and (max-width: 900px) {
    margin-left: -1.25em;
    margin-right: -1.25em;
    padding: 1em 3em;
  }
}

.article-list {
  font-family: var(--sans-font);

  h1 {
    margin: 10px 0 15px;
    font-size: 1.5rem;

    &::before {
      content: '';
      padding-left: 0.75em;
      border-left: 2px solid var(--yellow);
    }
  }

  ul {
    padding-left: 0.5em;
    list-style: circle;
    margin: 10px 0;
    line-height: 30px;
  }

  a {
    text-decoration: none;
    color: var(--shizuku-text-color);
    border-bottom: 1px solid rgb(0 0 0 / 0%);
    margin-right: 1em;
    transition: border 0.15s ease-out;
  }

  a:hover {
    border-color: var(--shizuku-text-color);
  }

  .date {
    margin-right: 0.5em;
  }

  .meta {
    opacity: 0.88;
    color: var(--shizuku-text-color);
    font-size: 80%;
  }
}

/* for print */

@media print {
  p,
  div,
  article {
    font-family: var(--serif-font) !important;
  }

  h1,
  h1 *,
  h2,
  h2 *,
  h3,
  h3 *,
  h4,
  h4 *,
  h5,
  h5 *,
  h6,
  h6 * {
    font-family: var(--sans-font) !important;
  }

  nav,
  header,
  footer,
  #comment-wrapper,
  .kami-news,
  .kami-toc,
  .loader,
  *[data-hide-print] {
    display: none;
  }

  body {
    background: none;
  }

  .is-note .note-article {
    box-shadow: none;
    border: 0;

    &::before,
    &::after {
      display: none;
    }
  }

  .kami-intro {
    margin-top: 30%;
    transform: translateY(-50%);
    max-width: 30em;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: space-around;
  }

  button.btn {
    display: none;
  }

  button {
    opacity: 0;
  }

  .is-note #write > ul .indent,
  .is-note #write > .paragraph .indent {
    border: 0;
  }

  main {
    padding: 0;
  }

  #copyright * {
    color: #bbb !important;
  }

  #write pre > code {
    max-height: none !important;
  }
}

a.edit-link {
  font-size: 0.8rem;
  margin-left: 0.5rem;
  opacity: 0.8;
  color: var(--green);
}

.mermaid > svg {
  margin: auto;
}

/* prism */
pre[class*='language-'] > code {
  position: relative;
  display: block;
  overflow: auto;
  padding-left: 3.8rem;
}

pre[class*='language-'] {
  padding-left: 0 !important;
  line-height: 1.5;
}

.line-numbers .line-numbers-rows {
  left: 0rem !important;
}

@media (max-width: 568px) {
  #mx-message-container {
    top: calc(3.5rem + 8px);
  }
}

/* image-zoom */
.medium-zoom-overlay {
  z-index: 9;
}

.medium-zoom-overlay + .medium-zoom-image {
  z-index: 10;
}

/* Toast */
.Toastify {
  position: fixed;
  z-index: 99;
  top: 12px;
  right: 12px;
}

.Toastify--animate {
  animation-fill-mode: both;
  animation-duration: 0.7s;
}

.Toastify__toast-container div {
  opacity: 1 !important;
}

.Toastify__bounce-enter--top-right,
.Toastify__bounce-enter--bottom-right {
  animation-name: Toastify__bounceInRight;
}

.Toastify__bounce-exit--top-right,
.Toastify__bounce-exit--bottom-right {
  animation-name: Toastify__bounceOutRight;
}

@keyframes Toastify__bounceInRight {
  from,
  60%,
  75%,
  90%,
  to {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  from {
    transform: translate3d(3000px, 0, 0);
  }
  60% {
    transform: translate3d(-25px, 0, 0);
  }
  75% {
    transform: translate3d(10px, 0, 0);
  }
  90% {
    transform: translate3d(-5px, 0, 0);
  }
  to {
    transform: none;
  }
}

@keyframes Toastify__bounceOutRight {
  20% {
    opacity: 1;
    transform: translate3d(-20px, 0, 0);
  }
  to {
    opacity: 0;
    transform: translate3d(2000px, 0, 0);
  }
}
